import java.util.LinkedList;
import java.util.Stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: dings
 * Date: 2024-07-10
 * Time: 12:53
 */
public class Test {
    public static void main(String[] args) {
        LinkedList<Integer> stack = new LinkedList<>();
        stack.push(1);
        stack.push(2);
        System.out.println(stack.peek());
        stack.pop();
        System.out.println(stack);

        Stack<Integer> stack1 = new Stack<>();
        stack1.push(1);
        stack1.push(2);
        System.out.println(stack1);
    }
}
